export interface ImageProps {
  _id?: string;
  url?: string;
  createdAt?: string;
  fitUrl?: string;
}

// 若不传P，默认值为Record<string, never>，即{}，空对象约束，不能有任何属性
export interface ResponseType<P = Record<string, never>> {
  code: number;
  msg: string;
  data: P;
}

export interface ListDictType<P> {
  [id: string]: P;
}

export interface ListResponse<P> {
  list: P[];
  count: number;
  currentPage: number;
  pageSize: number;
}

export interface ListReqType {
  cid?: string;
  currentPage?: number;
  pageSize?: number;
}

export type ListResType<P> = ResponseType<ListResponse<P>>;
